﻿@model IEnumerable<StudentManagement.Models.Student>

@{
    ViewBag.Title = "学生列表页";
}

<div class="card-deck">
    @foreach (var student in Model)
    {
        <div class="card m-3">
            <div class="card-header">
                <h3>@student.Name</h3>
            </div>
            <img class="card-img-top" src="~/images/OIP_108.png" asp-append-version="true"/> @*Image增强标签，解决浏览器缓存导致图片不更新问题*@
            <div class="card-footer text-center">
                <a asp-controller="home" asp-action="details" asp-route-id="@student.Id" class="btn btn-primary">查看</a>
                @*@Html.ActionLink("查看", "details", "home", new { id = student.Id })
                <a href="@Url.Action("details","home",new { id = student.Id })" class="btn btn-primary">查看</a>
                <a href="/home/details/@student.Id" class="btn btn-primary">查看</a>*@
                <a href="#" class="btn btn-primary">编辑</a>
                <a href="#" class="btn btn-danger">删除</a>
            </div>
        </div>
    }
</div>